package com.kede.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kede.domain.LeescoreGoodsDomain;
import com.kede.service.LeescoreGoodsService;
import com.kede.mapper.LeescoreGoodsMapper;
import org.springframework.stereotype.Service;

/**
* @author 11856
* @description 针对表【sy_leescore_goods(推广类型)】的数据库操作Service实现
* @createDate 2023-05-15 14:16:46
*/
@Service
public class LeescoreGoodsServiceImpl extends ServiceImpl<LeescoreGoodsMapper, LeescoreGoodsDomain>
    implements LeescoreGoodsService{

    @Override
    public boolean BackStockNumById(Integer id,Integer num){
        LeescoreGoodsDomain byId = this.getById(id);
        byId.setStock(byId.getStock() + num);
        return this.updateById(byId);
    }
}




